{extend name="layout/detail" /}
{block name="content"}
<div class="td-content-wrap p20">
    <div class="td-content-header">
        <h1>注册访问</h1>
    </div>
    <hr>
    <div class="space-20"></div>
    <form id="form_data" class="layui-form" method="post">
        <input type="hidden" name="data_type" value="visit">
        <div class="layui-form-item">
            <label class="layui-form-label">供货商注册：</label>
            <div class="layui-input-block">
                <div class="layui-input-inline w7">
                    <div class="layui-form-mid">
                        是否开启
                    </div>
                </div>
                <div class="layui-input-inline">
                    <input class="hidden" name="visit_is_open_register_supplier" value="0">
                    <input type="checkbox" name="visit_is_open_register_supplier" lay-skin="switch"  value="1"
                           lay-filter="switchTest"
                           td-checked="{$system_data.visit_is_open_register_supplier|default=''}"
                           lay-text="开启|关闭">
                </div>
                <div class="layui-input-inline w7">
                    <div class="layui-form-mid">
                        是否审核
                    </div>
                </div>
                <div class="layui-input-inline">
                    <input  class="hidden" name="visit_is_confirm_register_supplier" value="0">
                    <input type="checkbox" name="visit_is_confirm_register_supplier" lay-skin="switch"  value="1"
                           lay-filter="switchTest"
                           td-checked="{$system_data.visit_is_confirm_register_supplier|default=''}"
                           lay-text="开启|关闭">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">采购商注册：</label>
            <div class="layui-input-block">
                <div class="layui-input-inline w7">
                    <div class="layui-form-mid">
                        是否开启
                    </div>
                </div>
                <div class="layui-input-inline">
                    <input  class="hidden" name="visit_is_open_register_purchaser" value="0">
                    <input type="checkbox" name="visit_is_open_register_purchaser" lay-skin="switch"  value="1"
                           lay-filter="switchTest"
                           td-checked="{$system_data.visit_is_open_register_purchaser|default=''}"
                           lay-text="开启|关闭">
                </div>
                <div class="layui-input-inline w7">
                    <div class="layui-form-mid">
                        是否审核
                    </div>
                </div>
                <div class="layui-input-inline">
                    <input class="hidden" name="visit_is_confirm_register_purchaser" value="0">
                    <input type="checkbox" name="visit_is_confirm_register_purchaser" lay-skin="switch"  value="1"
                           lay-filter="switchTest"
                           td-checked="{$system_data.visit_is_confirm_register_purchaser|default=''}"
                           lay-text="开启|关闭">
                </div>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">店铺评价：</label>
            <div class="layui-input-block">
                <div class="layui-input-inline w7">
                    <div class="layui-form-mid">
                        是否开启
                    </div>
                </div>
                <div class="layui-input-inline">
                    <input class="hidden" name="visit_is_open_store_comment" value="0">
                    <input type="checkbox" name="visit_is_open_store_comment" lay-skin="switch" lay-filter="switchTest"  value="1"
                           td-checked="{$system_data.visit_is_open_store_comment|default=''}"
                           lay-text="开启|关闭">
                </div>
                <div class="layui-input-inline w7">
                    <div class="layui-form-mid">
                        是否审核
                    </div>
                </div>
                <div class="layui-input-inline">
                    <input class="hidden" name="visit_is_confirm_store_comment" value="0">
                    <input type="checkbox" name="visit_is_confirm_store_comment" lay-skin="switch"  value="1"
                           lay-filter="switchTest"
                           td-checked="{$system_data.visit_is_confirm_store_comment|default=''}"
                           lay-text="开启|关闭">
                </div>
            </div>
        </div>
        <hr>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <div class="layui-input-block">
                <a class="layui-btn" lay-submit="" lay-filter="demo2" onclick="save();">保存</a>
                <a class="layui-btn layui-btn-primary" onclick="go_return_url();">取消</a>
            </div>
        </div>
    </form>
</div>
{/block}

{block name="script"}
<script>
    layui.use(['common', 'uploader', 'element'], function () {
        var fn = {
            save: function () {
                send_form("form_data", "{:url('save')}", function (ret) {
                    if (ret.code) {
                        layer.msg(ret.msg, {
                            time: 1200
                        }, function () {
                            location.reload(true);
                        });
                    } else {
                        layer.msg(ret.msg);
                        return false;
                    }
                });
            }
        };
        win_exp(fn);
    });
</script>
{/block}